#ifndef INFO_INIT_H
#define INFO_INIT_H

#include "http_post.h"

class Info_Init : public Http_Post
{
	Q_OBJECT
public:
	Info_Init(Http_Post *parent = 0);
	~Info_Init();

	QString deviceId() const { return m_deviceId; }
	QString loginUserName() const { return m_loginUserName; }
	QString loginNickName() const { return m_loginNickName; }
	QList<QObject*> contactList() const { return m_contactList; }
	QString loginHeadImgUrl() const {return "file://" + QWXDIR + "/" + m_loginUserName;}

	void postV2(QString uin, QString sid, QString ticket);

Q_SIGNALS:
	void error();

	void loginUserNameChanged();
	void loginNickNameChanged();
	void contactListChanged();
	void loginHeadImgUrlChanged();
	void init_ok(QString userName, QString nickName, QString skey, QStringList syncKey, QString device_id);

protected:
	void finished(QNetworkReply* reply);

private:
	QString m_deviceId;
	QString m_loginUserName;
	QString m_loginNickName;
	QList<QObject*> m_contactList;
	QMap<QString, QString> m_map;

private:
	void m_clear();
};

#endif // INFO_INIT_H
